<div class="container"> 
<!-- middle -->
<div id="middle" class="cols2">
	
    <div class="title">
    	<h1><span><?=$cat_title?></span></h1>
    </div>  
    
    <div class="content" role="main">
		       
    	<article class="post-detail post-page">
        <?php foreach($records as $row):?>            
			<div class="entry">    
              <h4><?=anchor(trainingUrl($row['training_date'],$row['training_category'],$row['training_id'],$row['training_title']),$row['training_title'],'style="color:#222"')?></h4>
              
              <div class="post-meta">
			     <?php if(is_superUser()):?>
				 <a onclick="return confirm('Are you sure you want to Update this Training !')" href="<?=site_url('training/edit/'.$row['training_id'].'/'.seoUrl($row['training_title']))?>" class="author">Update</a> <span class="separator">|</span>
			     <a onclick="return confirm('Are you sure you want to Remove this Training !')" href="<?=site_url('training/remove/'.$row['training_id'].'/'.seoUrl($row['training_title']))?>" class="author">Remove</a> <span class="separator">|</span>
			     <?php endif;?>
				 <a href="#"><?=$row['training_files'].' Files'?></a>
              </div>
             <?=word_limiter($row['training_content'],25,'.....')?>
              <div class="clear"></div>
			</div>
        <?php endforeach;?>
            	                
        </article> 
	</div>
    <!--/ content -->
    
    <!-- sidebar -->
    <div class="sidebar">

		<div class="widget-container widget_nav_menu">
        	<img src="images/icons/icons_16_menu.png" alt="" class="widget_icon">
           		<h3 class="widget-title">TRAINING CATEGORIES</h3>
                    <ul>
                        <?php foreach($categories as $row):?>                       		
                            <li><a <?php if($cat_link==$row['category_id']) echo 'class="active"' ?> href="<?=site_url('training/index/'.$row['category_id'].'/'.seoUrl($row['category_name']))?>"><span><?=$row['category_name']?></span></a></li> 
                        <?php endforeach;?>
							<?php if(is_superUser()):?>	
							 <li><a href="<?=site_url('training/add_category')?>"><span><?='Add New Category'?></span></a></li>
							<?php endif;?>
                        <?php //$categories->free_result(); ?>    
                            <!--<li><a href="shortcodes-text.html"><span>Text & Images</span></a></li>
                            <li><a href="shortcodes-charts.html"><span>Charts</span></a></li>  
                            <li><a href="shortcodes-columns.html"><span>Columns</span></a>
                            	<ul>
									<li><a href="shortcodes-columns-full.html"><span>Full width page</span></a></li>  
									<li><a href="shortcodes-columns-full2.html"><span>Full width with Gallery</span></a></li>  
								</ul>
                            </li>  
                            <li><a href="shortcodes-lightbox.html"><span>Lightbox</span></a></li>
                            <li><a href="shortcodes-media.html"><span>Videos & Galleries</span></a></li>
                            <li><a href="shortcodes-maps.html"><span>Google Maps</span></a></li>
                            <li><a href="shortcodes-tabs.html"><span>Tabs and Toggles</span></a></li>
                            <li><a href="shortcodes-tables.html"><span>Boxes & Tables</span></a></li>                            
                            <li class="current-menu-item"><a href="shortcodes-typography.html"><span>Typography</span></a></li>
                            <li><a href="shortcodes-widgets.html"><span>Widgets</span></a></li>-->
                    </ul>
		</div> 
                    
    </div>
    <!--/ sidebar -->
     
    
        	
</div>
<!--/ middle --> 
</div>
<!--/ container -->